<?php
/**
 * User: b179a9
 * Date: 10/11/11
 * Time: 5:31 PM
 */

class App_Form_User_Form extends Zend_Form
{

    public function init()
    {

        $postal = new Zend_Form_Element_Text('postal');
        $postal->setLabel('Postal code:')
                ->addValidator(new Zend_Validate_Digits());
        $this->addElement($postal);

        $oldPassword = new Zend_Form_Element_Password('oldPassword');
        $oldPassword->setLabel('Old password:');
        $this->addElement($oldPassword);

        $newPassword = new Zend_Form_Element_Password('newPassword');
        $newPassword->setLabel('New password:')
                ->addValidator(new Lib_Form_Validate_InputEquals('newPasswordConfirmation'));
        $this->addElement($newPassword);

        $newPasswordConfirmation = new Zend_Form_Element_Password('newPasswordConfirmation');
        $newPasswordConfirmation->setLabel('New password confirmation')
                ->addValidator(new Lib_Form_Validate_InputEquals('newPassword'));
        
        $this->addElement($newPasswordConfirmation);

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Update');
        $this->addElement($submit);


    }

}
